package udf.string;

import java.io.IOException;
import java.util.UUID;

import org.apache.pig.EvalFunc;
import org.apache.pig.data.Tuple;
import org.apache.pig.data.TupleFactory;


public class CreateUniqueId extends EvalFunc<Tuple> {

	public Tuple exec(Tuple input) throws IOException {

		
		
				Tuple output = TupleFactory.getInstance().newTuple();

			
				UUID idOne = UUID.randomUUID();

			//	System.out.println("Processing:" + domain + "\t" + level);
				output.append( idOne.toString());
				return output;

		

		
	}

	
	public static void main(String args[]){
		UUID idOne = UUID.randomUUID();
		
		System.out.println(idOne);
		
	}
	
}
